import UIKit

protocol SH {
    func aaa()
}

enum Password: SH {
    
    func aaa() {
        print("aaa")
    }
    
    case number(code: Bool, msg: String) // 32
    case other // 1
    /*
    var a: Int {
        return 1
    }
    
    static var b: Int = 10
    
    func nnn() {
        
        switch self {
        case let .number(code, msg):
            print(code, msg)
        case .other:
            break
        }
        
    }
    
    static func bbb() {
        print("bbb")
    }
     */
    
}

// 实际占用的大小
let size = MemoryLayout<Password>.size

// 系统分配的内存大小
let stride = MemoryLayout<Password>.stride

// 内存对齐
let alignment = MemoryLayout<Password>.alignment

MemoryLayout<Bool>.size
MemoryLayout<Int8>.size
MemoryLayout<Int16>.size
MemoryLayout<Int32>.size
MemoryLayout<Int64>.size
MemoryLayout<Int>.size
MemoryLayout<Double>.size
MemoryLayout<Character>.size
MemoryLayout<String>.size
